<template>
    <div class="tou">
        <div class="head">
            <router-link to="citys"><div class="left  iconfont icon-angle-down" @click="citys()"></div></router-link>
            <div class="right"><span class="fdj iconfont icon-fangdajing" @click="tiao()"></span><input type="text" placeholder="请输入蛋糕、鲜花、礼品" @click="input()" ref="demoinputval"></div>
            <span class="per iconfont icon-wode" @click="person()">{{this.$store.state.hi}}</span>
      </div>
    </div>
</template>

<script>
import {getlink} from "@/api/getapi.js"
// import {postlink} from "@/api/setpostlink.js"
export default {
    data(){
      return {
        arr:[]
      }
    },
    created(){
      getlink("http://180.76.121.47:8008/location").then((ok)=>{
        this.arr=ok.data
        // console.log(this.arr)
      })
    },
    methods:{
      person(){
          // console.log(this.$refs.demoinputval.value)
          let newval=this.$refs.demoinputval.value
          this.$store.commit("add",newval)
          this.$router.push("/DAccountLogin")
      },
      citys(){
        this.$router.push("/citys")
      },
      input(){
        // this.$router.push("/input")
      },
      tiao(){
        this.$router.push("/input")
      }
    }
}
</script>

<style scoped>
  .tou{
    font-size: 0.12rem;
  }
    .head{
      position: relative;
      font-size: 0.16rem;
      padding: 0.1rem 0;
      margin: 0 auto;
      text-align: center;
    }
    .right{
      position: relative;
      margin-right: 0.1rem;
    }
    .fdj{
      position: relative;
      left:0.2rem;
      top: 50%;
    }
    .left{
      position: absolute;
      color: red;
      text-indent: 0.1rem;
      z-index: 100;
      font-size: 0.12rem;
    }
    input{
      width: 55%;
      outline: none;
      border: none;
      border: 1px solid #ddd;
      padding: 0.05rem 0.1rem;
      font-size: 0.12rem;
      border-radius: 0.06rem;
      text-indent: 0.2rem;
      margin-left: 10%;
    }
    .per{
      position: absolute;
      right: 0.05rem;
      top: 30%;
    }
</style>